Add fluent DSL equivalents for core task types and expand coverage#1448
Conversation
|
@matheusandre1 Are you working on this one or it is ready for review? (it is marked as draft, thats why Im asking) |
Yes, that part is correct, you can review it. |
There was a problem hiding this comment.
Pull request overview
Adds standard (non-experimental) fluent DSL coverage for the Serverless Workflow “core task types” by introducing a comprehensive test suite that runs both YAML samples and their DSL-built equivalents, and by extending the fluent use DSL to support reusable error definitions needed by raise workflows.
Changes:
- Added
CoreTaskTypesTestto validate YAML sample parity with fluent DSL workflows for conditional-set, for, switch, fork, raise, and expression usage. - Implemented fluent
use.errors(...)support (builder + DSL spec) to define reusable errors used byraisetasks. - Expanded test coverage for reusable error definitions via the new
use.errorsfluent API.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| impl/test/src/test/java/io/serverlessworkflow/impl/test/CoreTaskTypesTest.java | New parameterized tests exercising YAML-vs-DSL parity across core task types and expressions. |
| fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/UseBuilder.java | Adds fluent builder support for use.errors and reusable error definitions. |
| fluent/spec/src/main/java/io/serverlessworkflow/fluent/spec/dsl/UseSpec.java | Adds DSL-level use().errors(...) wiring to the underlying UseBuilder. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| err -> | ||
| err.type("https://serverlessworkflow.io/errors/not-implemented") | ||
| .status(500) | ||
| .title("Not Implemented") |
There was a problem hiding this comment.
| error(URI.create("https://serverlessworkflow.io/errors/not-implemented"), 500) | ||
| .title("Not Implemented") | ||
| .detail( |
There was a problem hiding this comment.
I believe that's not correct; the method is a unified setter with automatic pattern matching detection.
There was a problem hiding this comment.
Signed-off-by: Matheus André <matheusandr2@gmail.com>
Many thanks for submitting your Pull Request ❤️!
What this PR does / why we need it:
Closes: #1434
Special notes for reviewers:
#1206 (comment)
Additional information (if needed):